﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;

namespace Knjiga
{
    public partial class WebForm4 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ArrayList listaBoja = new ArrayList();
            listaBoja.Add("crvena");
            listaBoja.Add("plava");
            listaBoja.Add("zelena");
            listaBoja.Add("crna");
           
            
         //   rbList.DataSource = listaBoja;
         //   rbList.DataBind();
            
          //  ddl1.DataSource = listaBoja;
            //ddl1.DataBind();
            
            ArrayList listaPica = new ArrayList();
            listaPica.Add("pivo");
            listaPica.Add("vino");
            listaPica.Add("rakija");
            listaPica.Add("sok");
            listaPica.Add("voda");
            lBox1.DataSource = listaPica;
            lBox1.DataBind();

            Style mojstil = new Style();
            switch (ddl1.SelectedIndex)
            {
                case 0: mojstil.BackColor = Color.Red;
                    mojstil.ForeColor = Color.RoyalBlue;
                    break;
                case 1: mojstil.BackColor = Color.Blue;
                    mojstil.ForeColor = Color.Red;
                    break;
                case 2: mojstil.BackColor = Color.Green;
                    mojstil.ForeColor = Color.Orange;
                    break;
                case 3: mojstil.BackColor = Color.Black;
                    mojstil.ForeColor = Color.White;
                    break;
            }
            
            txtIme.ApplyStyle(mojstil);
            Label1.ApplyStyle(mojstil);
            var x = rbList.SelectedItem.Text;
            body.Style["background-color"] = rbList.Text;
        }

    }
}